import c from 'classnames'
import emojiMap from './map'
import './sprites.less'
import './index.less'

export { emojiMap }

export default function Emoji(props: { code: string; className?: string }) {
  const { code, className } = props

  if (!emojiMap.has(code)) return null

  return <span className={c('qun-emoji', 'emoji-' + emojiMap.get(code)!, className)}></span>
}
